package com.eling.elcms.travel.model;

import com.eling.elcms.core.dao.annotation.Between;
import com.eling.elcms.core.dao.annotation.In;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;

import javax.persistence.*;
import java.util.Date;

/**
 * 散客预约房价
 * 
 * @author xuechao
 *
 */
@Entity
@Table(name = "travel_signuproomprice")
@Indexed
public class SignUpRoomPrice extends BaseModel{

	private static final long serialVersionUID = 3783786812696755174L;

	@Id
	@In
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@DocumentId
	private Long pkSignUpRoomPrice;
	
	/** 散客预约房型  */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pkSignUpRoom")
	@IndexedEmbedded(depth = 1)
	private SignUpRoom signUpRoom;
	
	/** 房价 */
	@Column
	private Double roomPrice;
	
	/** 入住价 */
	@Column
	private Double checkInPrice;
	
	/**出售日期*/
	@Column
	@Field
	@Between
	private Date liveDate;
	
	/** 房价是否含早餐 */
	@Column
	@Field
	private Boolean breakfast;

	/** 房价是否含三餐 */
	@Column
	@Field
	private Boolean threeMeals;
	
	@Version
	private Integer version;

	public Long getPkSignUpRoomPrice() {
		return pkSignUpRoomPrice;
	}

	public void setPkSignUpRoomPrice(Long pkSignUpRoomPrice) {
		this.pkSignUpRoomPrice = pkSignUpRoomPrice;
	}

	public Double getCheckInPrice() {
		return checkInPrice;
	}

	public void setCheckInPrice(Double checkInPrice) {
		this.checkInPrice = checkInPrice;
	}

	public Date getLiveDate() {
		return liveDate;
	}

	public void setLiveDate(Date liveDate) {
		this.liveDate = liveDate;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Double getRoomPrice() {
		return roomPrice;
	}

	public void setRoomPrice(Double roomPrice) {
		this.roomPrice = roomPrice;
	}

	public Boolean getBreakfast() {
		return breakfast;
	}

	public void setBreakfast(Boolean breakfast) {
		this.breakfast = breakfast;
	}

	public Boolean getThreeMeals() {
		return threeMeals;
	}

	public void setThreeMeals(Boolean threeMeals) {
		this.threeMeals = threeMeals;
	}

	public SignUpRoom getSignUpRoom() {
		return signUpRoom;
	}

	public void setSignUpRoom(SignUpRoom signUpRoom) {
		this.signUpRoom = signUpRoom;
	}

}
